#!/bin/sh
#volume
VOL_STATUS=$(amixer sget Master | tail -n1 | sed -r "s/.*\[(.*)\]/\1/")
VOL=$(amixer get Master | tail -n1 | sed -r "s/.*\[(.*)%\].*/\1/")
if [ "$VOL_STATUS" = "off" ]; then
	bar="🔇"
elif [ "$VOL" -gt -1 ] && [ "$VOL" -lt 21 ]; then
	bar="🔈"
elif [ "$VOL" -gt 20 ] && [ "$VOL" -lt 41 ]; then
	bar="🔉"
elif [ "$VOL" -gt 40 ] && [ "$VOL" -lt 61 ]; then
	bar="🔊"
elif [ "$VOL" -gt 60 ]; then
	bar="📢"
fi

echo "$bar"
printf " \x0e%s%%\x0b│" "$VOL"

